import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';

class ContainerCase extends StatelessWidget {
  const ContainerCase({super.key});

  @override
  Widget build(BuildContext context) {
    return Container(
      width: 200,
      height: 200,
      //内边距
      padding: const EdgeInsets.all(20),
      // padding: const EdgeInsets.only(top:30,left: 30),// 单独设置
      // padding: const EdgeInsets.symmetric(horizontal: 30),// 水平，垂直统一设置
      // padding: const EdgeInsets.fromLTRB(10, 10, 0, 0), //上 右 下 左
      //外边距
      margin: const EdgeInsets.all(10),
      //对齐,支持9个方向，center 水平垂直居中
      alignment: Alignment.center,
      //盒子装饰
      decoration: BoxDecoration(
          //圆角
          borderRadius: BorderRadius.circular(30), // 四个方向圆角
          //边框
          border: Border.all(color: Colors.green, width: 10),
          //阴影，支持多个
          boxShadow:const [
            BoxShadow(
              color: Color.fromARGB(192, 0, 0, 129),
              offset: Offset(10, 10),
              blurRadius: 10,
            ),
          ],
          //渐变
          gradient: const LinearGradient(
            colors: [Colors.red, Colors.orange],
            //渐变方向
            begin: Alignment.topLeft,
            end: Alignment.bottomRight,
          )),
      child: const Text("hello dalin"),
    );
  }
}
